<?php
/*
 * Copyright (c) 2017-2025 Tencent. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
namespace TencentCloud\Ccc\V20200210\Models;
use TencentCloud\Common\AbstractModel;

/**
 * DescribeAutoCalloutTask response structure.
 *
 * @method string getName() Obtain Task name.
 * @method void setName(string $Name) Set Task name.
 * @method string getDescription() Obtain <Task description>.
 * @method void setDescription(string $Description) Set <Task description>.
 * @method integer getNotBefore() Obtain Task start timestamp.
 * @method void setNotBefore(integer $NotBefore) Set Task start timestamp.
 * @method integer getNotAfter() Obtain Task end timestamp.
Note: this field may return null, indicating that no valid values can be obtained.
 * @method void setNotAfter(integer $NotAfter) Set Task end timestamp.
Note: this field may return null, indicating that no valid values can be obtained.
 * @method array getCallers() Obtain Calling list.
 * @method void setCallers(array $Callers) Set Calling list.
 * @method array getCallees() Obtain Called information list.
 * @method void setCallees(array $Callees) Set Called information list.
 * @method integer getIvrId() Obtain IvrId used by the task.
 * @method void setIvrId(integer $IvrId) Set IvrId used by the task.
 * @method integer getState() Obtain Task status: 0 - initial, 1 - running, 2 - completed, 3 - ending, 4 - terminated.
 * @method void setState(integer $State) Set Task status: 0 - initial, 1 - running, 2 - completed, 3 - ending, 4 - terminated.
 * @method string getRequestId() Obtain The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
 * @method void setRequestId(string $RequestId) Set The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
 */
class DescribeAutoCalloutTaskResponse extends AbstractModel
{
    /**
     * @var string Task name.
     */
    public $Name;

    /**
     * @var string <Task description>.
     */
    public $Description;

    /**
     * @var integer Task start timestamp.
     */
    public $NotBefore;

    /**
     * @var integer Task end timestamp.
Note: this field may return null, indicating that no valid values can be obtained.
     */
    public $NotAfter;

    /**
     * @var array Calling list.
     */
    public $Callers;

    /**
     * @var array Called information list.
     */
    public $Callees;

    /**
     * @var integer IvrId used by the task.
     */
    public $IvrId;

    /**
     * @var integer Task status: 0 - initial, 1 - running, 2 - completed, 3 - ending, 4 - terminated.
     */
    public $State;

    /**
     * @var string The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
     */
    public $RequestId;

    /**
     * @param string $Name Task name.
     * @param string $Description <Task description>.
     * @param integer $NotBefore Task start timestamp.
     * @param integer $NotAfter Task end timestamp.
Note: this field may return null, indicating that no valid values can be obtained.
     * @param array $Callers Calling list.
     * @param array $Callees Called information list.
     * @param integer $IvrId IvrId used by the task.
     * @param integer $State Task status: 0 - initial, 1 - running, 2 - completed, 3 - ending, 4 - terminated.
     * @param string $RequestId The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
     */
    function __construct()
    {

    }

    /**
     * For internal only. DO NOT USE IT.
     */
    public function deserialize($param)
    {
        if ($param === null) {
            return;
        }
        if (array_key_exists("Name",$param) and $param["Name"] !== null) {
            $this->Name = $param["Name"];
        }

        if (array_key_exists("Description",$param) and $param["Description"] !== null) {
            $this->Description = $param["Description"];
        }

        if (array_key_exists("NotBefore",$param) and $param["NotBefore"] !== null) {
            $this->NotBefore = $param["NotBefore"];
        }

        if (array_key_exists("NotAfter",$param) and $param["NotAfter"] !== null) {
            $this->NotAfter = $param["NotAfter"];
        }

        if (array_key_exists("Callers",$param) and $param["Callers"] !== null) {
            $this->Callers = $param["Callers"];
        }

        if (array_key_exists("Callees",$param) and $param["Callees"] !== null) {
            $this->Callees = [];
            foreach ($param["Callees"] as $key => $value){
                $obj = new AutoCalloutTaskCalleeInfo();
                $obj->deserialize($value);
                array_push($this->Callees, $obj);
            }
        }

        if (array_key_exists("IvrId",$param) and $param["IvrId"] !== null) {
            $this->IvrId = $param["IvrId"];
        }

        if (array_key_exists("State",$param) and $param["State"] !== null) {
            $this->State = $param["State"];
        }

        if (array_key_exists("RequestId",$param) and $param["RequestId"] !== null) {
            $this->RequestId = $param["RequestId"];
        }
    }
}
